<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of term_condition
 *
 * @author Nguyen Thai Binh
 */
class term_condition extends CI_Controller {

  public function __construct() {
    parent::__construct();
    set_userdata('end_user_current_url', current_url());
    if (!userdata('country_id') || !userdata('state_id') || !userdata('city_id')) {
      if (!userdata('end_user_user_id')) {
        redirect('welcome');
      } else {
        redirect('welcome/location');
      }
      return;
    }
  }

  public function index() {
    set_userdata('end_user_current_url', current_url());
    $content = $this->content_model->get(array('key' => 'term_condition'));
    if (!empty($content)) {
      $content = $content['content'];
    } else
      $content = '';
    $this->load->view('user/term_condition', array('title_html' => $this->lang->line('label.end_user.title.term_condition'),
        'content' => $content));
  }

}
